import {
    ADD_NUMBER,
    SUB_NUMBER,
    INCREMENT,
    DECREMENT
  } from './constants.js';
  
  // export function addAction(num) {
  //   return {
  //     type: "ADD_NUMBER",
  //     num
  //   }
  // }
  
  // export const addAction = (num) => {
  //   return {
  //     type: "ADD_NUMBER",
  //     num
  //   }
  // }

  // ()不能删除 返回一个对象
  export const addAction = num => ({
    type: ADD_NUMBER,
    num
  });
  
  export const subAction = num => ({
    type: SUB_NUMBER,
    num
  });
  
  export const incAction = () => ({
    type: INCREMENT
  });
  
  export const decAction = () => ({
    type: DECREMENT
  });
  
  